package com.hmall.order.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hmall.order.mapper.OrderDetailMapper;
import com.hmall.order.pojo.OrderDetail;
import com.hmall.order.service.OrderDetailService;
import org.springframework.stereotype.Service;

/**
* @author 15198
* @description 针对表【tb_order_detail(订单详情表)】的数据库操作Service实现
* @createDate 2022-08-12 17:15:08
*/
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail>
    implements OrderDetailService {


    @Override
    public OrderDetail getByOrderId(Long orderId) {
        LambdaQueryWrapper<OrderDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(OrderDetail::getOrderId,orderId);
        return  this.getOne(wrapper);
    }
}




